package de.koller.oceanFramework.plain;

import de.koller.oceanFramework.tree.Sea3X;
import java.awt.Graphics2D;

/**
 * 
 * @author Fabian Koller
 */
public class Sea3P extends Sea3X {
	
	/**
	 * 
	 */
	protected PlainGameRoot rgroot;

	/**
	 * 
	 */
	@Override
	protected void init() {
		super.init();

		rgroot = (PlainGameRoot)this.searchMother( PlainGameRoot.class );
	}

	/**
	 * 
	 * @param elapsedTime
	 */
	@Override
	final protected void render( int elapsedTime ) {
		super.render( elapsedTime );
		
		this.render( elapsedTime, rgroot.getGraphics() );
	}

	/**
	 * 
	 */
	@Override
	final public void postChildRender() {
		super.postChildRender();
		
		this.renderPostChild( rgroot.getGraphics() );
	}
	
	/**
	 * 
	 * @param elapsedTime
	 * @param g
	 */
	protected void render( int elapsedTime, Graphics2D g ) {
		
	}
	
	/**
	 * 
	 * @param g
	 */
	protected void renderPostChild( Graphics2D g ) {
		
	} 
	
}
